//
//  RCacheManager.h
//  iPlan
//
//  Created by 侯伟 on 2021/9/16.
//

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN


@class RVideoUrlObj;
@class RVideoObj;
@class RCacheObj;
@class RCacheCellObj;

@interface RCacheManager : NSObject

+ (instancetype)share;

/// 缓存大小
- (NSString*)cacheSizeStr;

/// 缓存视频
/// @param video 视频
/// @param urlObj 地址
- (void)cacheVideo:(RVideoObj*)video url:(RVideoUrlObj*)urlObj;

/// 所有的缓存
- (NSArray<RCacheObj*>*)allCacheItems;

/// 所有的列表
- (NSArray<RCacheCellObj*>*)allCacheCells;

//开始缓存
- (void)startAllCache;

- (void)stopAllCache;

/// 删除缓存
- (void)removeCacheWithURLStr:(NSString*)urlStr;

/// 删除所有缓存
- (void)removeAllCache;

@end

NS_ASSUME_NONNULL_END
